<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/tld/fn.tld" prefix="fn" %>
<div title="维护布控车辆" id="superviseVehicleSelectDialog" class="dialogtitle">
	<div class="searchbox" align="center">
		<span class="fontRed">注:</span>带"<span class="fontRed">*</span>"为必填项
		<form id="frmSuperviseVehicle" onSubmit="return false">
			<input type="hidden" name="id" value="<c:out value='${superviseVehicle.id }'/>">
			<table id="superviseVehicleEdit" class="rvimsbordercolor" cellspacing="0" cellpadding="0" style="border-top-width:1px;" >
				<tr>
					<td align="right" style="width: 20%;">号牌号码：<span><font color="red">*</font></span></td>
					<td style="width:30%; "><input type="text" id="plateNum" name="plateNum"value="<c:out value='${superviseVehicle.id }'/>"></td>
					<td align="center" style="width: 40%;" rowspan="8" colspan="2">
						<img src="http://t2.gstatic.com/images?q=tbn:ANd9GcQPVzYsWtUoKnZ4Gg9jFHticUh-YAPqN2KNprlXL0jsItLlZqvY" id="imageURL"width="200"  height="200" />
					</td>
  				</tr>
  				<tr>
  					<td align="right">号牌种类：<span><font color="red">*</font></span></td>
   					<td>
   						<select id="plateTypeId" name="plateTypeId">
							<option value="">---请选择---</option>
							<c:forEach items="${lstPlateType}" var="plateType">
								<option value="${plateType.id}" ${plateType.id == superviseVehicle.plateTypeId ? "selected" : ""}><c:out value="${plateType.name}"/></option>
							</c:forEach>
						</select> 
   					</td>				
				</tr>
				<tr>
					<td colspan="2" style="padding-right: 6%" align="right"><button onclick="ajaxFindVehicleCommon()">获取机动车信息</button></td>
				</tr>
				<tr>
					<td align="right">车身颜色：&nbsp;</td>
					<td>
						<select id="vehicleColorId" name="vehicleColorId">
							<option value="">---请选择---</option>
							<c:forEach items="${lstVehicleColor}" var="vehicleColor">
								<option value="${vehicleColor.id }" ${vehicleColor.id == superviseVehicle.vehicleColorId ? "selected" : ""}><c:out value="${vehicleColor.name }"/></option>
							</c:forEach>
						</select>
					</td>
  				</tr>
				<tr>
					<td align="right" style="width: 114px;">车辆分类：&nbsp;</td>
					<td>
						<select id="vehicleClassificationId" name="vehicleClassificationId">
							<option value="">---请选择---</option>
							<c:forEach items="${lstVehicleClassification}" var="vehicleClassification">
								<option value="${vehicleClassification.id }" ${vehicleClassification.id == superviseVehicle.vehicleClassificationId ? "selected" : ""}><c:out value="${vehicleClassification.name}"></c:out></option>
							</c:forEach>
						</select>
					</td>
  				</tr>
				<tr>
					<td align="right" style="width: 114px;">车辆类型：&nbsp;</td>
					<td>
						<select id="vehicleTypeId" name="vehicleTypeId">
							<option value="">---请选择---</option>
							<c:forEach items="${lstVehicleType}" var="vehicleType">
								<option value="${vehicleType.id }" ${vehicleType.id == superviseVehicle.vehicleTypeId ? "selected" : ""}><c:out value="${vehicleType.name}"></c:out></option>
							</c:forEach>
						</select>
					</td>
  				</tr>
				<tr>
					<td align="right" style="width: 114px;">号牌颜色：&nbsp;</td>
					<td>
						<select id="plateColorId" name="plateColorId">
							<option value="">---请选择---</option>
							<c:forEach items="${lstPlateColor}" var="plateColor">
								<option value="${plateColor.id}" ${plateColor.id == superviseVehicle.plateColorId ? "selected" : ""}><c:out value="${plateColor.name}"/></option>
							</c:forEach>
						</select>
					</td>
  				</tr>
				<tr>
					<td align="right" style="width: 114px;">布控类型：<span><font color="red">*</font></span></td>
					<td>
						<select id="superviseTypeId" name="superviseTypeId">
							<option value="">---请选择---</option>
							<c:forEach items="${lstSuperviseType}" var="superviseType">
								<option value="${superviseType.id}" ${superviseType.id == superviseVehicle.superviseTypeId ? "selected" : ""}><c:out value="${plateColor.name}"/></option>
							</c:forEach>
						</select>
					</td>
  				</tr>
				<tr>
					<td align="right" style="width: 114px;">车辆来源：<span><font color="red">*</font></span></td>
					<td align="left"><input type="text" id="vehicleSource" name="vehicleSource" value="<c:out value='${superviseVehicle.id }'/>"></td>
					<td colspan="2" align="right"><input type="file" name="fileField" id="fileField" style="width: 230px;" onchange="readURL(this);" /></td>
  				</tr>
  				<tr>
               	  <td align="right">布控原因：&nbsp;</td>
                  <td colspan="3">
                  	<label for="textarea"></label>
					<textarea name="textarea" id="textarea" cols="45"style="width: 89%;" rows="5" ></textarea>
                  </td>
              	</tr>
              	<tr>
					<td align="right" style="border-top-width:1px; border-top-style: dashed;" class="rvimsbordercolor"><span class="fontRed">提   示：&nbsp;</span></td>
					<td colspan="3" style="border-top-width:1px; border-top-style: dashed;" class="rvimsbordercolor">1.图片大小不能大于1M<br></td>
				</tr>
				<tr>
					<td></td>
					<td colspan="3">2.图片格式为：jpg、jpeg、gif、png、bmp</td>
				</tr>
  			</table>
  		</form>
  		<div id="infoSuperviseVehicle" class="fontRed"></div>
  	</div>
</div>			
<script>
	function readURL(input) {
		if (input.files && input.files[0]) {
			var reader = new FileReader();
			reader.onload = function (e) {
				$('#imageURL').attr('src', e.target.result).width(200).height(200);
			};
			reader.readAsDataURL(input.files[0]);
		}
	}
</script>
  				
  				